package cn.iocoder.yudao.module.erp.convert.purchase;

import cn.iocoder.yudao.module.erp.dal.dataobject.purchaseorder.PurchaseOrderGoodsDO;
import org.mapstruct.BeanMapping;
import org.mapstruct.Mapper;
import org.mapstruct.Mapping;
import org.mapstruct.Mappings;
import org.mapstruct.factory.Mappers;

import java.util.List;

@Mapper
public interface ErpPurchaseOrderGoodsConvert {
    ErpPurchaseOrderGoodsConvert INSTANCE = Mappers.getMapper(ErpPurchaseOrderGoodsConvert.class);
    @BeanMapping(ignoreByDefault = true)
    @Mappings({
            @Mapping(target = "id", source = "id"),
            @Mapping(target = "noInNum", source = "noInNum"),
            @Mapping(target = "inNum", source = "inNum")
    })
    PurchaseOrderGoodsDO convertSelf(PurchaseOrderGoodsDO bean);

    List<PurchaseOrderGoodsDO> convertSelfList(List<PurchaseOrderGoodsDO> beans);
}
